| Conditions | 7 |
| Paths | 12 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | (() => { |
||
| 39 | const detectJs = chain => { |
||
| 40 | const properties = chain.split('.'); |
||
| 41 | |||
| 42 | let value = properties.length ? window : null; |
||
| 43 | |||
| 44 | for ( let i = 0; i < properties.length; i ++ ) { |
||
| 45 | let property = properties[i]; |
||
| 46 | |||
| 47 | if ( value && value.hasOwnProperty(property) ) { |
||
| 48 | value = value[property]; |
||
| 49 | } else { |
||
| 50 | value = null; |
||
| 51 | |||
| 52 | break; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | return typeof value === 'string' || typeof value === 'number' ? value : !!value; |
||
| 57 | }; |
||
| 58 | } catch(e) { |
||
| 62 |